<?php
/**
 * 版本:酷享云支付3.0版
 * 作者：余生
 * 官网：www.kuxiangcms.com
 * 技术QQ：2316803263
 * 酷享云支付官网:pay.kuxiangcms.cn
**/
//网站配置
include("../includes/common.php");
include './head.php';
if ($islogin == 1) {
} else {
  exit("<script language='javascript'>window.location.href='./login.php';</script>");
} 
?>
<?php 
if(isset($_POST['submit'])) {
    foreach ($_POST as $k => $value) {
        if($k=='pwd')continue;
        $value=daddslashes($value);
        $DB->query("insert into pay_config set `k`='{$k}',`v`='{$value}' on duplicate key update `v`='{$value}'");
    }

    exit("<script language='javascript'>alert('修改成功！');window.location.href='./set.php';</script>");
}
?>   
<div class="x-nav">
          <span class="layui-breadcrumb">
           <a>
              首页</a>
            <a>
              <cite>网站管理</cite></a>
          </span>
          <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" onclick="location.reload()" title="刷新">
            <i class="layui-icon layui-icon-refresh" style="line-height:30px"></i></a>
        </div>

  <div class="layui-tab page-content-wrap layui-card">
      <ul class="layui-tab-title">
        <li class="layui-this">站点配置</li>
        <li>SEO配置</li>
        <li>邮箱配置</li>
        <li>安全配置</li>
        <li>接口配置</li>
        <li>基本配置</li>
      </ul>
      <div class="layui-tab-content">
        <!--站点配置-->
        <div class="layui-tab-item layui-show">
          <form class="layui-form" action="" method="post" style="width: 90%;padding-top: 20px;">
            <div class="layui-form-item">
              <label class="layui-form-label">网站名称：</label>
              <div class="layui-input-block">
                <input type="text"  autocomplete="off" required="" class="layui-input" name="web_name" value="<?php echo $conf['web_name']; ?>">
              </div>
            </div>
            <div class="layui-form-item">
              <label class="layui-form-label">网站域名：</label>
              <div class="layui-input-block">
                <input type="text" name="local_domain" required="" value="<?php echo $conf['local_domain']; ?>" autocomplete="off" class="layui-input">
              </div>
            </div>
            <div class="layui-form-item">
              <label class="layui-form-label">站长邮箱：</label>
              <div class="layui-input-block">
                <input type="text"  required="" lay-verify="required" placeholder="请输入联系邮箱" autocomplete="off" class="layui-input" name="email" value="<?php echo $conf['email']; ?>">
              </div>
            </div>
            <div class="layui-form-item">
              <label class="layui-form-label">客服QQ：</label>
              <div class="layui-input-block">
                <input type="text" name="web_qq" required="" lay-verify="required" placeholder="请输入客服QQ" autocomplete="off" class="layui-input" value="<?php echo $conf['web_qq']; ?>">
              </div>
            </div>

            <div class="layui-form-item">
              <label class="layui-form-label">QQ群号:</label>
              <div class="layui-input-block">
                <input type="text" name="QQqun" required lay-verify="required" placeholder="请输入QQ群号" autocomplete="off" class="layui-input" value="<?php echo $conf['QQqun']; ?>">
              </div>
            </div>
             <div class="layui-form-item">
              <label class="layui-form-label">QQ群链接:</label>
              <div class="layui-input-block">
                <input type="text" name="qun" required lay-verify="required" placeholder="请输入QQ群链接" autocomplete="off" class="layui-input" value="<?php echo $conf['qun']; ?>">
              </div>
            </div>
            <div class="layui-input-inline layui-form-item layui-show-xs-block">
                       <label class="layui-form-label">网站开关:</label>
                                <div class="layui-input-block">
                                <select  class="form-control" name="user_kai">
                                <option value="0" <?=$conf['user_kai']=='0'?"selected":""?> >开启网站</option>
                                <option value="1" <?=$conf['user_kai']=='1'?"selected":""?> >关闭维护</option>
              </select>  
              </div>
              </div>
              <br>
               <div class="layui-form-item layui-form-text">
              <label class="layui-form-label">网站关闭提示：</label>
              <div class="layui-input-block">
                <textarea name="user_kail"  placeholder="请输入关闭提示" class="layui-textarea"><?php echo $conf['user_kail']; ?></textarea>
              </div>
            </div>
              <div class="layui-input-inline layui-form-item layui-show-xs-block">
                       <label class="layui-form-label">前台模板:</label>
                                <div class="layui-input-block">
                                <select  class="form-control" name="template">
                                <option value="moban" <?=$conf['template']=='moban'?"selected":""?> >默认模板</option>
                                <option value="moban1" <?=$conf['template']=='moban1'?"selected":""?> >酷享官方模板</option>
                                 <option value="moban2" <?=$conf['template']=='moban2'?"selected":""?> >易支付模板</option>
                               </select>  
              </div>
              </div>
               <div class="layui-input-inline layui-form-item layui-show-xs-block">
                       <label class="layui-form-label">模板主题:</label>
                                <div class="layui-input-block">
                                <select  class="form-control" name="temp">
                                <option value="0" <?=$conf['temp']=='0'?"selected":""?> >红色主题</option>
                                <option value="1" <?=$conf['temp']=='1'?"selected":""?> >天蓝色主题</option>
                                <option value="2" <?=$conf['temp']=='2'?"selected":""?> >渐变绿主题</option>
                                <option value="3" <?=$conf['temp']=='3'?"selected":""?> >亮色系主题</option>
                                <option value="4" <?=$conf['temp']=='4'?"selected":""?> >深蓝主题</option>
              </select>  
              </div>
              </div>
              <br>
             

            <div class="layui-form-item">
              <label class="layui-form-label">备案信息：</label>
              <div class="layui-input-block">
                <input type="text" name="icp" required lay-verify="required" placeholder="请输入备案信息" autocomplete="off" class="layui-input" value="<?php echo $conf['icp']; ?>">
              </div>
            </div>
            <div class="layui-form-item">
              <label class="layui-form-label">版权信息：</label>
              <div class="layui-input-block">
                <input type="text" name="ban" required lay-verify="required" placeholder="请输入版权信息" autocomplete="off" class="layui-input" value="<?php echo $conf['ban']; ?>">
              </div>
            </div>
            <div class="layui-form-item">
              <label class="layui-form-label">公司地址：</label>
              <div class="layui-input-block">
                <input type="text" name="address" required lay-verify="required" placeholder="请输入公司地址信息" autocomplete="off" class="layui-input" value="<?php echo $conf['address']; ?>">
              </div>
            </div>
            <div class="layui-form-item layui-form-text">
              <label class="layui-form-label">统计代码：</label>
              <div class="layui-input-block">
                <textarea name="tongji"  placeholder="请输入代码" class="layui-textarea"><?php echo $conf['tongji']; ?></textarea>
              </div>
            </div>

             <div class="layui-form-item layui-form-text">
              <label class="layui-form-label">注册公告：</label>
              <div class="layui-input-block">
                <textarea name="user_gong"  placeholder="注册公告请控制在200字内" class="layui-textarea"><?php echo $conf['user_gong']; ?></textarea>
              </div>
            </div>
            <div class="layui-form-item">
              <div class="layui-input-block">
              <input type="submit" name="submit" value="保存修改" class="layui-btn layui-btn-normal "/>
              </div>
            </div>
          </form>
        </div>
           
            
        <!--SEO配置-->
        <div class="layui-tab-item">
           <form class="layui-form" action="" method="post" style="width: 90%;padding-top: 20px;">
            <div class="layui-form-item">
              <label class="layui-form-label">SEO标题：</label>
              <div class="layui-input-block">
                <input type="text" name="web_seo" placeholder="请输入seo标题" autocomplete="off" class="layui-input" value="<?php echo $conf['web_seo']; ?>">
              </div>
            </div>
            <div class="layui-form-item">
              <label class="layui-form-label">关键字：</label>
              <div class="layui-input-block">
                <input type="text" name="web_keyword" placeholder="请输入seo关键字" autocomplete="off" class="layui-input" value="<?php echo $conf['web_keyword']; ?>">
              </div>
            </div>
            <div class="layui-form-item layui-form-text">
              <label class="layui-form-label">描述：</label>
              <div class="layui-input-block">
                <textarea name="web_desc" placeholder="请输入seo描述" class="layui-textarea"><?php echo $conf['web_desc']; ?></textarea>
              </div>
            </div>
            <div class="layui-form-item">
              <div class="layui-input-block">
                <input type="submit" name="submit" value="保存修改" class="layui-btn layui-btn-normal "/>
              </div>
            </div>
          </form>
        </div>
        <!--邮箱配置-->
        <div class="layui-tab-item">
          <form class="layui-form" action="" method="post" style="width: 90%;padding-top: 20px;">
                      <div class="layui-input-inline layui-form-item layui-show-xs-block">
                       <label class="layui-form-label">发件设置:</label>
                                <div class="layui-input-block">
                                <select  class="form-control" name="mail_cloud">
                                <option value="1" <?=$conf['mail_cloud']==1?"selected":""?> >sendcloud</option>
                                <option value="0" <?=$conf['mail_cloud']==0?"selected":""?> >SMTP发信</option>
                               </select>  
              </div>
              </div><br>

            <div class="layui-form-item">
              <label class="layui-form-label">SMTP地址:</label>
              <div class="layui-input-block">
                <input type="text" name="mail_smtp" placeholder="请输入SMTP地址" autocomplete="off" class="layui-input" value="<?php echo $conf['mail_smtp']; ?>">
              </div>
            </div>
            <div class="layui-form-item">
              <label class="layui-form-label">端口：</label>
              <div class="layui-input-block">
                <input type="text" name="mail_port" placeholder="请输入邮件发送端口" autocomplete="off" class="layui-input" value="<?php echo $conf['mail_port']; ?>">
              </div>
            </div>
            <div class="layui-form-item">
              <label class="layui-form-label">邮箱账号：</label>
              <div class="layui-input-block">
                <input type="text" name="mail_name" placeholder="请输入邮箱账号" autocomplete="off" class="layui-input" value="<?php echo $conf['mail_name']; ?>">

                <div class="layui-form-mid layui-word-aux">
                          <span class="x-red">*</span>邮箱账号
                      </div>
              </div>
               
            </div>
           <div class="layui-form-item">
              <label class="layui-form-label">邮箱授权码：</label>
              <div class="layui-input-block">
                <input type="text" name="mail_pwd" placeholder="请输入邮箱授权码" autocomplete="off" class="layui-input" value="<?php echo $conf['mail_pwd']; ?>">

                <div class="layui-form-mid layui-word-aux">
                          <span class="x-red">*</span>邮箱授权码
                      </div>
              </div>
               
            </div>
            <div class="layui-form-item">
              <label class="layui-form-label">sendcloud API_USER:</label>
              <div class="layui-input-block">
                <input type="text" name="mail_apiuser" placeholder="请输入API_USER" autocomplete="off" class="layui-input" value="<?php echo $conf['mail_apiuser']; ?>">
              </div>
            </div>
            <div class="layui-form-item">
              <label class="layui-form-label">sendcloud API_KEY:：</label>
              <div class="layui-input-block">
                <input type="text" name="mail_apikey" placeholder="请输入 API_KEY" autocomplete="off" class="layui-input" value="<?php echo $conf['mail_apikey']; ?>">
              </div>
            </div>
   
              <div class="layui-form-item">
              <label class="layui-form-label">友情提示:</label>
              <div class="layui-input-block">
                  <div class="layui-form-mid layui-word-aux">
                          <span class="x-red">*</span>当选择了邮箱发件方式后以下内容不用填写！
                      </div>
             </div>
              
                </div>
            
              
            <div class="layui-form-item">
              <label class="layui-form-label">短信验证码:</label>
              <div class="layui-input-block">
                <input type="text" name="sms_appkey" placeholder="请输入短信验证码" autocomplete="off" class="layui-input" value="<?php echo $conf['sms_appkey']; ?>">

              </div>

            </div>
            <div class="layui-form-item">
              <label class="layui-form-label">CAPTCHA_ID:</label>
              <div class="layui-input-block">
                <input type="text" name="CAPTCHA_ID" placeholder="请输入CAPTCHA_ID" autocomplete="off" class="layui-input" value="<?php echo $conf['CAPTCHA_ID']; ?>">
              </div>
            </div>
            <div class="layui-form-item">
              <label class="layui-form-label">PRIVATE_KEY:</label>
              <div class="layui-input-block">
                <input type="text" name="PRIVATE_KEY" placeholder="请输入PRIVATE_KEY" autocomplete="off" class="layui-input" value="<?php echo $conf['PRIVATE_KEY']; ?>">
              </div>
            </div>
            <div class="layui-form-item">
              <div class="layui-input-block">
               <input type="submit" name="submit" value="保存修改" class="layui-btn layui-btn-normal "/>
              </div>
            </div>
          </form>
        </div>
       
        <div class="layui-tab-item">
           <form class="layui-form" action="" method="post" style="width: 90%;padding-top: 20px;">
            <div class="layui-input-inline layui-form-item layui-show-xs-block">
                       <label class="layui-form-label">支付测试:</label>
                                <div class="layui-input-block">
                                 <select  class="form-control" name="demo_is">
                                <option value="1" <?=$conf['demo_is']==1?"selected":""?> >开启</option>
                                <option value="0" <?=$conf['demo_is']==0?"selected":""?> >关闭</option>
                               </select>  
                               <div class="layui-form-mid layui-word-aux">* 首页支付演示开关</div>
                              </div>

                          </div><br>

          <div class="layui-input-inline layui-form-item layui-show-xs-block">
                       <label class="layui-form-label">商户二次验证:</label>
                                <div class="layui-input-block">
                                 <select  class="form-control" name="safe_switch">
                                <option value="1" <?=$conf['safe_switch']==1?"selected":""?> >开启</option>
                                <option value="0" <?=$conf['safe_switch']==0?"selected":""?> >关闭</option>
                               </select>  
                               <div class="layui-form-mid layui-word-aux">* 商户二次安全验证开关</div>
                              </div>

                          </div>
           
            <div class="layui-form-item">
              <label class="layui-form-label">提示信息:</label>
              <div class="layui-input-block">
                <input type="text" name="safe_info" placeholder="请输入提示信息" autocomplete="off" class="layui-input" value="<?php echo $conf['safe_info']; ?>">
              </div>

            </div>
            <div class="layui-form-item layui-form-text">
              <label class="layui-form-label">拦截关键字：</label>
              <div class="layui-input-block">
                <textarea name="goods_lj" placeholder="请输入拦截关键字" class="layui-textarea"><?php echo $conf['goods_lj']; ?></textarea>

                <div class="layui-form-mid layui-word-aux">* 多个关键字用、分割 如：刷钻、黑号、AV</div>
              </div>
            </div>

            <div class="layui-form-item">
              <label class="layui-form-label">拦截提示：</label>
              <div class="layui-input-block">
                <input type="text" name="goods_ljtis" placeholder="请输入拦截提示" autocomplete="off" class="layui-input" value="<?php echo $conf['goods_ljtis']; ?>">

                <div class="layui-form-mid layui-word-aux">
                          <span class="x-red">*</span>拦截提示
                      </div>
              </div>
               
            </div>
            <div class="layui-form-item">
              <div class="layui-input-block">
                 <input type="submit" name="submit" value="保存修改" class="layui-btn layui-btn-normal "/>
              </div>
            </div>
          </form>
        </div>

        <div class="layui-tab-item">
           <form class="layui-form" action="" method="post" style="width: 90%;padding-top: 20px;">

          <div class="layui-input-inline layui-form-item layui-show-xs-block">
                       <label class="layui-form-label">接口选择:</label>
                                <div class="layui-input-block">
                                  <select  class="form-control" name="quicklogin">
                  <option value="1" <?=$conf['quicklogin']==1?"selected":""?> >支付宝快捷登陆</option>
                   <option value="2" <?=$conf['quicklogin']==2?"selected":""?> >QQ快捷登陆</option>
              </select>                   
                    </div>
                    </div>
           
            <div class="layui-form-item">
              <label class="layui-form-label">QQappid:</label>
              <div class="layui-input-block">
                <input type="text" name="QQ_appid" placeholder="请输入QQappid" autocomplete="off" class="layui-input" value="<?php echo $conf['QQ_appid']; ?>">
              </div>
            </div>
            <div class="layui-form-item">
              <label class="layui-form-label">QQappkey:</label>
              <div class="layui-input-block">
                <input type="text" name="QQ_appkey" placeholder="请输入QQappkey" autocomplete="off" class="layui-input" value="<?php echo $conf['QQ_appkey']; ?>">
              </div>
            </div>
            <div class="layui-form-item">
              <label class="layui-form-label">回调地址:</label>
              <div class="layui-input-block">
                <input type="text" name="QQ_callback" placeholder="请输入回调地址" autocomplete="off" class="layui-input" value="<?php echo $conf['QQ_callback']; ?>">
                <div class="layui-form-mid layui-word-aux">
                          <span class="x-red">*</span>回调地址默认为： http://您站点域名/user/connect.php
                      </div>
              </div>
               
               
            </div>

             <div class="layui-form-item">
              <label class="layui-form-label">友情提示:</label>
              <div class="layui-input-block">
                  <div class="layui-form-mid layui-word-aux">
                          <span class="x-red">*</span>当选择了支付宝快捷登入后请配置以下内容！
                      </div>
             </div>
              
                </div>

                 <div class="layui-form-item">
              <label class="layui-form-label">合作身份者id:</label>
              <div class="layui-input-block">
                <input type="text" name="alipay_partnerlogin" placeholder="请输入合作身份者id" autocomplete="off" class="layui-input" value="<?php echo $conf['alipay_partnerlogin']; ?>">
              </div>
            </div>
            <div class="layui-form-item">
              <label class="layui-form-label">安全检验码:</label>
              <div class="layui-input-block">
                <input type="text" name="alipay_keylogin" placeholder="请输入安全检验码" autocomplete="off" class="layui-input" value="<?php echo $conf['alipay_keylogin']; ?>">
              </div>
            </div>
            
            <div class="layui-form-item">
              <div class="layui-input-block">
                 <input type="submit" name="submit" value="保存修改" class="layui-btn layui-btn-normal "/>
              </div>
            </div>
          </form>
        </div>

        <!--友链配置-->
        <div class="layui-tab-item">
           <form class="layui-form" action="" method="post" style="width: 90%;padding-top: 20px;">
       <div class="layui-form-item layui-form-text">
              <label class="layui-form-label">友情链接：</label>
              <div class="layui-input-block">
                <textarea name="web_you" placeholder="请输入按格式输入友情链接！" class="layui-textarea"><?php echo $conf['web_you']; ?></textarea>

                <div class="layui-form-mid layui-word-aux">* 按默认格式修改 域名与名称</div>
              </div>
            </div>
            <div class="layui-form-item layui-form-text">
              <label class="layui-form-label">用户协议：</label>
              <div class="layui-input-block">
                <textarea name="web_yong" placeholder="请输入用户协议！" class="layui-textarea"><?php echo $conf['web_yong']; ?></textarea>

                <div class="layui-form-mid layui-word-aux">* 用户协议内容:建议使用默认的</div>
              </div>
            </div>

            <div class="layui-form-item">
              <div class="layui-input-block">
                <input type="submit" name="submit" value="保存修改" class="layui-btn layui-btn-normal "/>
              </div>
            </div>
          </form>
        </div>
      </div>
    </div>
  <!--请勿盗卖酷享云支付源码程序 ，如发现盗卖将不提供更新服务，系统由余生网络信息提供技术服务-->
<script>
//Demo
layui.use('form', function(){
  var form = layui.form;
  

});
</script>